<?php
$this->breadcrumbs=array(
	'Email Templates',
);

?>
<br/>
<h1>Email Templates</h1>

<div class="nav_wrap">
<?php echo " <br/>".CHtml::link('Add New Template',ApplicationConfig::getURL("admin", "emailTemplate", "create"),array()); ?>
</div>
<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<div class="row">
		<?php echo $form->label($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>45,'maxlength'=>45)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'subject'); ?>
		<?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>200)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'from_name'); ?>
		<?php echo $form->textField($model,'from_name',array('size'=>45,'maxlength'=>45)); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'from_email'); ?>
		<?php echo $form->textField($model,'from_email',array('size'=>45,'maxlength'=>45)); ?>
	</div>


	<div class="row buttons">
		<?php echo CHtml::submitButton('Search'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->
<?php /*$this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'_view',
)); */ ?>


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'menu-category-grid',
	'dataProvider'=>$dataProvider,
	'columns'=>array(
			
	    'title',
	 	'subject', 	
	 	'from_name', 	
	 	'from_email', 
		'text_body', 
		'html_body',
		array(
			'class'=>'CButtonColumn',
			'template'=>'{update}{delete}',
			/*'buttons'=>array(
					'update'=>array(
							 //'url'=>'Yii::app()->createUrl("vendor/update/category_id/5")', 
							 'options'=>array(),),
					'Remove'=>array(
							 'url'=>'Yii::app()->createUrl("vendor/menuCategory/remove/id/$data->id")', 
							 'options'=>array('id'=>'delete_buttons'),
							 'imageUrl'=>"$remove_url_image",),				
									
					'ManageMenu'=>array(
							 'url'=>'Yii::app()->createUrl("vendor/menuItems/index/category_id/$data->id")', 
							 'options'=>array('id'=>'delete_buttons'),
							 'imageUrl'=>"$ManageMenu_url_image",),
							), 		*/
								
		),
	),
	
)); ?>